package com.dianning.web.action.pets;

import java.util.List;
import org.apache.commons.logging.*;

import com.dianning.service.ParameterService;
import com.dianning.web.action.BaseAction;

public class Index extends BaseAction{

	private static final Log logger = LogFactory.getLog(Index.class);
	
	private ParameterService parameterService;
	
	public ParameterService getParameterService() {
		return parameterService;
	}

	public void setParameterService(ParameterService parameterService) {
		this.parameterService = parameterService;
	}
	
	private List petsAdopt;
	private List petsCommodity;
	private List petsDog;
	private List petsPet;
	private List petsService;

	public List getPetsAdopt() {
		return petsAdopt;
	}

	public void setPetsAdopt(List petsAdopt) {
		this.petsAdopt = petsAdopt;
	}

	public List getPetsCommodity() {
		return petsCommodity;
	}

	public void setPetsCommodity(List petsCommodity) {
		this.petsCommodity = petsCommodity;
	}

	public List getPetsDog() {
		return petsDog;
	}

	public void setPetsDog(List petsDog) {
		this.petsDog = petsDog;
	}

	public List getPetsPet() {
		return petsPet;
	}

	public void setPetsPet(List petsPet) {
		this.petsPet = petsPet;
	}

	public List getPetsService() {
		return petsService;
	}

	public void setPetsService(List petsService) {
		this.petsService = petsService;
	}

	public String execute() {
		this.setPetsAdopt(this.getParameterService().findParameters("petsAdoptType", 2, null,"orders", 0));
		this.setPetsCommodity(this.getParameterService().findParameters("petsCommodityType", 2, null,"orders", 0));
		this.setPetsDog(this.getParameterService().findParameters("petsDogType", 2, null,"orders", 0));
		this.setPetsPet(this.getParameterService().findParameters("petsPetType", 2, null,"orders", 0));
		this.setPetsService(this.getParameterService().findParameters("petsServiceType", 2, null,"orders", 0));
		return SUCCESS;
	}
}
